package com.mioto.ld.module.alert.statistic;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author mioto-qinxj
 * @date 2024/6/15
 * @desc
 */
public class DeviceAlertStatisticsFactory {

    private static Map<Integer,AbstractDeviceAlertStatistics> map = new ConcurrentHashMap<>(4);

    static {
        map.put(1,new DeviceAlertMinuteStatistics());
        map.put(2,new DeviceAlertHourStatistics());
        map.put(3,new DeviceAlertWeekStatistics());
        map.put(4,new DeviceAlertDayStatistics());
    }

    public static AbstractDeviceAlertStatistics create(int type){
        return map.get(type);
    }
}
